import request from '@/utils/request'

// 备份到指定目录
export function downloadBackup(params) {
  return request({
    url: '/api/backup/backup',
    method: 'get',
    params: params
  })
}

// 获取备份文件
export function getBackupFilename() {
  return request({
    url: '/api/backup/backup-filename',
    method: 'get'
  })
}

// 上传
export function uploadBackupRestore(params) {
  return request({
    url: '/api/backup/restore',
    method: 'get',
    params: params
  })
}

// 备份是否运行
export function getBackupRunning() {
  return request({
    url: '/api/backup/backup-running',
    method: 'get'
  })
}

// 备份完成状态
export function getBackupStatus() {
  return request({
    url: '/api/backup/backup-status',
    method: 'get'
  })
}